export function getDeviceConnectionState(state?: number) {
  let stateMessage = '';
  switch (state) {
    case 0:
      stateMessage = '未连接';
      break;
    case 1:
      stateMessage = '搜索中';
      break;
    case 2:
      stateMessage = '连接中';
      break;
    case 3:
      stateMessage = '蓝牙连接成功';
      break;
    case 4:
      stateMessage = '蓝牙连接成功,开启同步数据';
      break;
    case 5:
      stateMessage = '设备主动断开了连接，或者系统断开了连接';
      break;
    case 6:
      stateMessage = '发起启动数据同步出现未知异常';
      break;
    case 7:
      stateMessage = '业务层主动停止了同步';
      break;
    case 8:
      stateMessage = '重复发送指令';
      break;
    case 9:
      stateMessage = '未找到设备';
      break;
    case 10:
      stateMessage = '鉴权失败';
      break;
  }
  return stateMessage;
}
